package net.bxx2004.zephyr.utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public abstract class Asynchronous{
    // 注意使用 ExecutorService 而非 Executor
    private Future<String> future;
    public Asynchronous(){
        ExecutorService executorService = Executors.newFixedThreadPool(1);
        future = executorService.submit(() -> run());
    }
    public abstract String run();
}
